<?php
namespace Home\Controller;
use Think\Controller;

/**
 * 所有需要登陆后查看的页面继承此Controller
 * @author Simon
 *
 */
class AuditController extends Controller {
    
    public function _initialize(){
    	//验证当前用户是否登陆
//     	$user_id = cookie('login_user_id');
//     	if(empty($user_id)){
//     		//未登录
//     		redirect(C('AdminConfig.login_page'));
//     		return;
//     	}
    	
    	$this->addServerConfig();
    }
    
    private function addServerConfig(){
    	$ServerConfig = array();
    	$ServerConfig['UrlConfig'] 		= C('UrlConfig');
    	$ServerConfig['AdminConfig'] 	= C('AdminConfig');
    	$ServerConfig['OrderConfig'] 	= C('OrderConfig');
    	$ServerConfig['PromoterConfig'] = C('PromoterConfig');
    
    	$this->assign('ServerConfig', $ServerConfig);
    	$this->assign('ServerConfigJson', json_encode($ServerConfig));
    }
    
}